package ssm.utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class BCryptPasswordEncoderUtils {

    /*创建加密方法类*/
    private static BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();

    public static  String encodePassword(String password){
        return bCryptPasswordEncoder.encode(password);
    }

    /*此处为该种方法的测试*/

    public static void main(String[] args) {
        String passWord = "123";
        String s = encodePassword(passWord);
        System.out.println(s);
    }
}
